package com.foreknow.demo10;

public class ExceptionDemo5 {

    public static int haha() {
        try {
            System.out.println(5/0);
            System.out.println("执行了try......");
            return 1;
        }catch (Exception e) {
            System.out.println("执行了catch......");
            return 2;
        }finally {
            System.out.println("执行了finally......");
            return 3;
        }
    }

    public static void main(String[] args) {
        int x = ExceptionDemo5.haha();
        System.out.println(x);
    }
}
